namespace LogProviderTestWebRole
{
    using Microsoft.WindowsAzure;
    using Microsoft.WindowsAzure.ServiceRuntime;

    using AzureLogProviders.Common;

    public class WebRole : RoleEntryPoint
    {
        public override bool OnStart()
        {
            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.

            CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =>
                   configSetter(RoleEnvironment.GetConfigurationSettingValue(configName)));
            Utilities.SetupLoggingForEnterpriseRollingFileLogProvider(CloudStorageAccount.DevelopmentStorageAccount, 1, "wad-log4net");
            Utilities.SetupLoggingForAzureDiagnosticLogProvider(CloudStorageAccount.DevelopmentStorageAccount, 1);

            return base.OnStart();
        }
    }
}
